{template common/contentheader}
<div class="setcontent">
	<div class="settitle">
		<h3>{lang title:mobile}</h3>
	</div>
	<div class="alert alert-info mt10">
		<span class="label label-info">{lang info:admin}</span>{lang description:mobile}
	</div>
	
	<div class="setform">
		<form class="pzform" action="{url admin/load?pm=mobile&act=setting&evt=save}" method="post">
			<div class="formgroup">
				<label class="formlabel">{lang lastest:mobile} {lang cover}:</label>
				<div class="formcontrol">
					<img alt="" src="{baseurl}data/attachments/category/0_cat.jpg">
              		<div id="button1" class="btn">{lang upload_pic:admin}</div>
              		<input type="hidden" class="input-text" name="filename" id="filename"/>
				</div>
				<span class="formhelp">{lang lastest:mobile} {lang cover}</span> 
			</div>
			
			<div class="formgroup">
				<label class="formlabel">{lang thumbsize:mobile}:</label>
				<div class="formcontrol">
					<label>{lang width:admin}:</label>
					<input type="text" class="small" id="thumb_width" name="thumb_width"  value="$setting['thumb_width']"> 
					<label>{lang height:admin}:</label>
               		<input type="text" class="small" id="thumb_height" name="thumb_height" value="$setting['thumb_height']">
				</div>
				<span class="formhelp">{lang thumbsize:mobile}</span>
			</div>
			
			<div class="formgroup">
				<label class="formlabel">{lang thumbquality:mobile}:</label>
				<div class="formcontrol">
					<input type="text" id="quality" name="quality" value="$setting['quality']"/>
				</div>
				<span class="formhelp">{lang thumbquality_tip:mobile}</span>
			</div>
			
			<div class="formgroup">
				<label class="formlabel">{lang showarticle:mobile}:</label> 
				<div class="formcontrol">
					<input type="radio" name="showarticle" value="1" {if $setting['showarticle']}checked{/if}>{lang yes:admin}</input>
              		<input type="radio" name="showarticle" value="0" {if !$setting['showarticle']}checked{/if}>{lang no:admin}</input>
				</div>
				<span class="formhelp">{lang showarticle:mobile}</span>
			</div>
			
			<div class="formgroup">
				<label class="formlabel">{lang postverify:mobile}:</label> 
				<div class="formcontrol">
					<input type="radio" name="postverify" value="1" {if $setting['postverify']}checked{/if}>{lang yes:admin}</input>
              		<input type="radio" name="postverify" value="0" {if !$setting['postverify']}checked{/if}>{lang no:admin}</input>
				</div>
				<span class="formhelp">{lang postverify_tip:mobile}</span>
			</div>
			
			<div class="formbuttons">
				<button type="submit" class="btn btn-primary">{lang save:admin}</button>
			</div>
		</form>
	</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
	var button = $('#button1'), interval;
	new AjaxUpload(button, {
		action: '{url admin/contentcategory?act=upload&catid=0}', 
		name: 'qqfile',
		responseType: 'json',
		onSubmit : function(file, ext){
			button.text('Uploading');
			this.disable();
			interval = window.setInterval(function(){
				var text = button.text();
				if (text.length < 13){
					button.text(text + '.');					
				} else {
					button.text('Uploading');				
				}
			}, 200);
		},
		onComplete: function(file, result){
			button.text('{lang upload_pic:admin}');
			window.clearInterval(interval);
						
			// enable upload button
			this.enable();
			if(result.success === 0){
				alert(result.message);
				return;
			}
			window.location.reload();
		}
	});
});
</script>
{template common/contentfooter}